package model

import (
	"fmt"
	"time"
)

type Order struct {
	OrderId int64 `xorm:"pk autoincr"`
	OrderState int
	OrderType int
	AccountId int64
	AccountName string
	LineType int
	CustomerId int64
	CustomerName string
	Commodity string
	TotalPrice float64
	CreatedAt time.Time
  	UpdatedAt time.Time
}

func (o *Order)QueryOrderList(cId int64) []*Order{
	var ovList []*Order
	x.Where("customer_id = ?", cId).And("order_state = ?", 39).And("line_type = ?", 1).Find(&ovList)

	fmt.Println(len(ovList))
	return ovList
}